package org.osite.xml;

/**
 * The interface to convert an XML element's attribute to Java internal object.
 * For example, {@link ColorConverter} will convert an attribute from string
 * value to Java's {@link java.awt.Color} instance.
 *
 * @author owenlin@google.com (Cheng-Ru Lin)
 *
 * @param <T> the return type of this convertor
 */
public interface AttributeConverter<T> {

  public T convert(Class<?> type, String value, ParseContext context)
      throws XmlParseException;
}
